`include "ascon_define.v"

module `ROUND
(
     input                        [`PC_CR_W-1:0] cr_i,
     input                            [`S_W-1:0] s_i,

     output                           [`S_W-1:0] s_o
);

wire                                 [`XI_W-1:0] pc_ps_x0;
wire                                 [`XI_W-1:0] pc_ps_x1;
wire                                 [`XI_W-1:0] pc_ps_x2;
wire                                 [`XI_W-1:0] pc_ps_x3;
wire                                 [`XI_W-1:0] pc_ps_x4;

wire                                 [`XI_W-1:0] ps_pl_x0;
wire                                 [`XI_W-1:0] ps_pl_x1;
wire                                 [`XI_W-1:0] ps_pl_x2;
wire                                 [`XI_W-1:0] ps_pl_x3;
wire                                 [`XI_W-1:0] ps_pl_x4;

`ROUND_PC
u_round_pc
(
    .cr_i                              (cr_i                                   ),
    .s_i                               (s_i                                    ),

    .x0_o                              (pc_ps_x0                               ),
    .x1_o                              (pc_ps_x1                               ),
    .x2_o                              (pc_ps_x2                               ),
    .x3_o                              (pc_ps_x3                               ),
    .x4_o                              (pc_ps_x4                               )
);

`ROUND_PS
u_round_ps
(
    .x0_i                              (pc_ps_x0                               ),
    .x1_i                              (pc_ps_x1                               ),
    .x2_i                              (pc_ps_x2                               ),
    .x3_i                              (pc_ps_x3                               ),
    .x4_i                              (pc_ps_x4                               ),

    .x0_o                              (ps_pl_x0                               ),
    .x1_o                              (ps_pl_x1                               ),
    .x2_o                              (ps_pl_x2                               ),
    .x3_o                              (ps_pl_x3                               ),
    .x4_o                              (ps_pl_x4                               )
);

`ROUND_PL
u_round_pl
(
    .x0_i                              (ps_pl_x0                               ),
    .x1_i                              (ps_pl_x1                               ),
    .x2_i                              (ps_pl_x2                               ),
    .x3_i                              (ps_pl_x3                               ),
    .x4_i                              (ps_pl_x4                               ),

    .s_o                               (s_o                                    )
);

endmodule